<template>
	<view class="">
		<!-- 标题 -->
		<navBar :title="title"></navBar>
		<!--  -->
		<view class="mx-16 mt-23">
			<uni-row class="demo-uni-row" :gutter="20">
				<uni-col :span="12">
					<!-- 1 -->
					<uni-card :is-shadow="false" is-full @click="$pub.go(`/pages/index/goodsList/goodsList`)">
						<view class="text-center">
							<image src="/static/img/index/list.svg" mode="" style="width:150rpx ;height: 132rpx;">
							</image>
							<view class="text-2xl pt-24">
								设备列表
							</view>
						</view>
					</uni-card>
				</uni-col>
				<uni-col :span="12">
					<!-- 1 -->
					<uni-card :is-shadow="false" is-full @click="$pub.go(`/pages/index/addGoods/addGoods`)">
						<view class="text-center">
							<image src="/static/img/index/add.svg" mode="" style="width:150rpx ;height: 132rpx;">
							</image>
							<view class="text-2xl pt-24">
								新增设备
							</view>
						</view>
					</uni-card>
				</uni-col>
			</uni-row>
		</view>
		<u-gap></u-gap>
		<!--  -->
<!-- 		<view class="">
			<u-tooltip style="height: 50px;color: blue;" :text="title" overlay :buttons="['复制','转发','删除']"></u-tooltip>
		</view> -->
		
<!-- 		<view class="" @click="getCode">
			'code'
		</view>
		<view class="CODE text-blue">
			::{{code}}
		</view> -->


	</view>
</template>

<script>
	// import navBar from '@/components/navBar/navBar.vue'
	export default {
		data() {
			return {
				title: '垃圾监控设备',
				code:""

			}
		},
		// components: {
		// 	navBar
		// },
		onLoad() {

		},
		methods: {
			getCode() {
				let that = this;
				uni.login({
					provider: "weixin",
					success: function(res) {
						console.log(res, "res Code");
						that.code = res.code
						// uni.getUserInfo({
						// 	provider: "weixin",
						// 	success: function(infoRes) {
						// 		console.log(infoRes,"infoRes");
						// 	},
						// 	fail: (error) => {
						// 		console.log('获取用户信息失败:', error);
						// 		// 在这里可以处理错误，例如显示错误提示信息或者进行其他操作
						// 	}
						// });
					},
				});
			}
		},
		onShow() {

		},
		onReady() {
			//新的标题
			// uni.setNavigationBarTitle({
			// 	title: '垃圾监控设备'
			// });
			// //标题蓝颜色
			// uni.setNavigationBarColor({
			// 	frontColor: '#000000',
			// 	backgroundColor: '#8ebbfd'
			// });
		},
	}
</script>

<style lang="scss" scoped>
	.index {}
</style>
<style>
	page {
		background-color: #f3f3f3;
	}
</style>